package com.moresir.validatetools.exceptions;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum LexerExceptionEnum {

    BEGIN_PARAM_NO_RULE("Can't begin param section because no rule name found. (Index: {index})", "未发现规则名,出现规则参数,rule:%s,index:%s"),

    NEED_RULE("Need valid rule name: [_a-zA-Z0-9]. (Index: {index})", "规则名语法错误,rule:%s,index:%s"),

    NO_RULES_MATCHING("No rule matching for rule name: {rule_name}. (Index: {index})", "不存在的规则名,rule:%s,index:%s"),

    NO_RULES_CONFIG("Invalid rule in Configuration, ruleName:%s, field:%s", "未配置的规则名,rule:%s,field:%s"),

    NEED_SOMETHING_IN_PARENTHESES("Need something in parentheses. (Index: {index})", "参数括号中缺失内容,rule:%s,index:%s"),

    NEED_SOMETHING_PARAM("Need a non empty param. (Index: {index})", "规则参数为空,rule:%s,index:%s"),

    NO_NEW_RULE_CAUSE_NO_RULE_NAME("Can't begin new rule because no rule name found. (Index: {index})", "规则分隔符前校验规则为空,rule:%s,index:%s"),

    UNKNOWN_CHAR("Lexer: Unexpected symbol: {char}. (Index: {index})", "校验规则语法错误字符,rule:%s,index:%s"),

    EMPTY("Lexer: Empty string input. (Index: {index})", "规则语法为空"),

    SYNTAX_ERROR("Syntax is fields... -> rules...", "规则语法错误,应以->分隔"),

    CONSTRUCT_RULE_ERROR("Something wrong when construct Rule for rule name: %s", "规则初始化失败,rule:%s");

    private String message;
    private String zhMsg;

}
